package jupiter.servlets;

import java.io.IOException;
import java.net.URLEncoder;
import org.mortbay.jetty.RetryRequest;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;


//import jupiter.messaging.Inbox;
import jupiter.message.Message;
import jupiter.util.*;

import org.json.*;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import jupiter.channel.Session;
import jupiter.filters.*;

public class MessageServlet extends HttpServlet {
	static public EventSubscriber subscriber = new EventSubscriber();
	Logger logger = LoggerFactory.getLogger(MessageServlet.class);
	public void service(HttpServletRequest req, HttpServletResponse res) throws java.io.IOException {
		if(Application.isNodeList()) {
			RequestHandler.sendResult(req, res, "You are accessing the nodelist");
			return;
		}
		RequestHandler.service(req, res, subscriber);
	}
}
